package com.honghu.cloud.feign;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.honghu.cloud.dto.FeignHandleFormDto;
import com.honghu.cloud.dto.OrderFormDto;

/**
 * 处理订单的业务类feign调用类
 * @author Administrator
 *
 */
@FeignClient(name="honghu-order-service" ,path="handleOrderForm")
public interface HandleOrderFormFeignClient {

	
	/**
	 * 提交订单
	 */
	@RequestMapping(value = "/apiForFeign/submitOrderFormForCart", method = RequestMethod.POST)
	public OrderFormDto submitOrderFormForCart(@RequestBody FeignHandleFormDto feignHandleFormDto);
	
	
	/**
	 * 提交订单(秒杀)
	 */
	@RequestMapping(value = "/apiForFeign/submitOrderFormKill", method = RequestMethod.POST)
	public OrderFormDto submitOrderFormKill(@RequestBody FeignHandleFormDto feignHandleFormDto);

	
	
	/**
	 * 余额支付
	 */
	@RequestMapping(value = "/apiForFeign/payByBalance", method = RequestMethod.POST)
	public boolean payByBalance(@RequestBody OrderFormDto order,
			@RequestParam("webPath")String webPath, @RequestParam("pay_msg")String pay_msg);
	
	
	@RequestMapping(value = "/apiForFeign/payByPayafter", method = RequestMethod.POST)
	public boolean payByPayafter(@RequestBody OrderFormDto order,
			@RequestParam("webPath")String webPath, @RequestParam("pay_msg")String pay_msg);




		@RequestMapping(value = "/apiForFeign/payByOnline", method = RequestMethod.POST)
	public boolean payByOnline(@RequestBody OrderFormDto main_order, @RequestParam("trade_no") String trade_no,
			@RequestParam("webPath") String webPath);
	
}


